package TestDemo;

public class TestDemo4 {
    public static void main(String[] args) {
        int count = 0;
        int[] months = {0,31,28,31,30,31,30,31,31,30,31,30,31};
        for (int year = 2011; year <= 2022; year++) {
            for (int month = 1; month <= 12; month++) {
                int day = months[month];
                if (month == 2 && year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
                    day++;
                }
                count += day;
            }
        }
        for (int month = 1; month <= 5; month++) {
            count -= months[month];
            if (month == 5) count++;
        }
        for (int month = 12; month >= 10; month--) {
            count -= months[month];
            if (month == 10) count += 25;
        }
        System.out.println("总共"+count+"天");
    }
}
